<?php $hint = htmlspecialchars(trim($this->getField()->getHint())); ?>
<?php if ($this->getFieldValue()) $hint = false; ?>
<input type='text' name='<?php echo $this->getFieldName() ?>' id='<?php echo $this->getFieldId() ?>'
       class='<?php echo $this->getFieldClass() ?> <?php if($hint){ echo 'webforms-fields-hint';}?>' style='<?php echo $this->getFieldStyle() ?>'
       value="<?php if ($hint) echo $hint; else echo htmlspecialchars($this->getFieldValue()); ?>"
       <?php if ($this->getField()->getType() == 'email'){ ?>onkeyup="this.value = this.value.replace(' ','');"<?php } ?>
       <?php if ($this->getField()->getDisabled()) { ?> disabled <?php } ?>
       <?php if ($hint){ ?>onfocus="if (this.value == '<?php echo str_replace("'","\'",$hint) ?>') {this.value = ''; $(this).removeClassName('webforms-fields-hint');}" onblur="if (this.value == '') {this.value = '<?php echo str_replace("'","\'",$hint) ?>'; $(this).addClassName('webforms-fields-hint');}"<?php } ?>/>